package com.yrk.service.impl;

import com.yrk.entity.User;
import com.yrk.mapper.UserMapper;
import com.yrk.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    //注册
    @Override
    public int registerUser(User user) {
        int num=userMapper.registerUser(user);
        return num;
    }
    //登录
    @Override
    public User loginUser(User user) {
        User user1=userMapper.loginUser(user);
        return user1;
    }
    //添加功能
    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }
    //删除
    @Override
    public int deleteUser(User user) {
        return userMapper.deleteUser(user);
    }
    //查询
    @Override
    public List<User> getUserList() {
        return userMapper.getUserList();
    }

}
